<%@page import="model.Student"%>
<%@page import="java.util.Map"%>
<%@page import="java.util.Collections"%>
<%@page import="java.util.List"%>
<%@page import="model.Teacher"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style>
.font_color{
	color: red;
}
</style>
</head>
<body>
<%
	//String name = (String)session.getAttribute("abc");
	Student student = (Student)session.getAttribute("student");
%>
<div>
学生登录成功，欢迎你，
<span class="font_color"><%= student.getStuName() %></span>
，以下是所开设全部课程的列表显示
</div>
<%
	List list = (List)session.getAttribute("list");
	if(list == null){
		list = Collections.EMPTY_LIST;
	}
%>
<table border="2">
	<tr>
		<th>课程编号</th>
		<th>课程名称</th>
		<th>课程课时</th>
		<th>课程学分</th>
		<th>授课教师</th>		
	</tr>
	<%
		Map map;
		for(int i = 0; i < list.size();i++){
			map = (Map)list.get(i);			
	%>
	<tr>
		<td><%= map.get("courId") %></td>
		<td><%= map.get("courName") %></td>
		<td><%= map.get("courHour") %></td>
		<td><%= map.get("courCredit") %></td>
		<td><%= map.get("tecName") %></td>		
	</tr>
	<%
		}
	%>
</table>
<div>
	可以<a href="">查看</a>
	<span class="font_color">
		<%= student.getStuName() %>
	</span>学生已讲授的课程列表显示
</div>
</body>
</html>